/********************************************************/
/*	Copyright (C) 2012 Gong Li Bin			*/
/*	Project:	MapReduce			*/
/*	Author:		gong_libin			*/
/*	Date:		2013_05_27			*/
/*	File:		MrMap.h				*/
/********************************************************/

#ifndef	_MRMAP_H
#define	_MRMAP_H 

#include "MrTask.h"

#define	MR_MP_VERSION			(char*)"MrMap-2.0.0"
#define	MR_MP_CONFIG			(char*)"SELECT Port FROM %s.%s WHERE HostID=%s"

void* MrMapThread(void* pNULL);
void MrMapFork(void* pAddr, UCHAR* puszPacket, int iLength);
void MrMapCore(CMrUdp& rCUdp, UCHAR* puszPacket, int iLength);
void MrMapProcess(struct sockaddr_in* pstAddr, UCHAR* puszPacket, int iLength);
UCHAR MrMapOutput(CMrSet& rCHub, MRPARA_S& rstOut, CMrPro& rCPro, UCHAR* puszPacket);

#ifdef _MR_TEST_
UCHAR MrMapTest(MRPARA_S& stIn, MRPARA_S& stOut);
#endif

#endif /* _MRMAP_H */
